// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_REP_APPLICATION
// * CreateDate    : 2014-06-05 18:30:31
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:31
// * LastChanger   : 2014-06-05 18:30:31
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class RepApplicationEntity : EntityBase
    {
        public RepApplicationTable TableSchema
        {
            get
            {
                return RepApplicationTable.Current;
            }
		}
		
		public RepApplicationEntity()
        {

        }
		
		public RepApplicationEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.RepApplicationId = Convert.ToString(CommonFunctions.ToObject(dr["REP_APPLICATION_ID"]));
			this.RepApplicationCode = Convert.ToString(CommonFunctions.ToObject(dr["REP_APPLICATION_CODE"]));
			this.RelatedOrderId = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_ORDER_ID"]));
			this.RelatedOrderType = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_ORDER_TYPE"]));
			this.ApplicationBy = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_BY"]));
			this.ApplicationDpt = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_DPT"]));
			this.CreateDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATE_DATE"]));
			this.CreateBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATE_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.AppovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPOVED_BY"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }
		
		public RepApplicationEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.RepApplicationId = Convert.ToString(CommonFunctions.ToObject(dr["REP_APPLICATION_ID"]));
			this.RepApplicationCode = Convert.ToString(CommonFunctions.ToObject(dr["REP_APPLICATION_CODE"]));
			this.RelatedOrderId = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_ORDER_ID"]));
			this.RelatedOrderType = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_ORDER_TYPE"]));
			this.ApplicationBy = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_BY"]));
			this.ApplicationDpt = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_DPT"]));
			this.CreateDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATE_DATE"]));
			this.CreateBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATE_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.AppovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPOVED_BY"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return RepApplicationTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string RepApplicationId
        {
            get { return Convert.ToString(GetData(RepApplicationTable.C_REP_APPLICATION_ID)); }
            set { SetData(RepApplicationTable.C_REP_APPLICATION_ID, value); }
        }
		
        [DataMember]
        public string RepApplicationCode
        {
            get { return Convert.ToString(GetData(RepApplicationTable.C_REP_APPLICATION_CODE)); }
            set { SetData(RepApplicationTable.C_REP_APPLICATION_CODE, value); }
        }
		
        [DataMember]
        public string RelatedOrderId
        {
            get { return Convert.ToString(GetData(RepApplicationTable.C_RELATED_ORDER_ID)); }
            set { SetData(RepApplicationTable.C_RELATED_ORDER_ID, value); }
        }
		
        [DataMember]
        public string RelatedOrderType
        {
            get { return Convert.ToString(GetData(RepApplicationTable.C_RELATED_ORDER_TYPE)); }
            set { SetData(RepApplicationTable.C_RELATED_ORDER_TYPE, value); }
        }
		
        [DataMember]
        public string ApplicationBy
        {
            get { return Convert.ToString(GetData(RepApplicationTable.C_APPLICATION_BY)); }
            set { SetData(RepApplicationTable.C_APPLICATION_BY, value); }
        }
		
        [DataMember]
        public string ApplicationDpt
        {
            get { return Convert.ToString(GetData(RepApplicationTable.C_APPLICATION_DPT)); }
            set { SetData(RepApplicationTable.C_APPLICATION_DPT, value); }
        }
		
        [DataMember]
        public DateTime CreateDate
        {
            get { return Convert.ToDateTime(GetData(RepApplicationTable.C_CREATE_DATE)); }
            set { SetData(RepApplicationTable.C_CREATE_DATE, value); }
        }
		
        [DataMember]
        public string CreateBy
        {
            get { return Convert.ToString(GetData(RepApplicationTable.C_CREATE_BY)); }
            set { SetData(RepApplicationTable.C_CREATE_BY, value); }
        }
		
        [DataMember]
        public DateTime LastModifiedDate
        {
            get { return Convert.ToDateTime(GetData(RepApplicationTable.C_LAST_MODIFIED_DATE)); }
            set { SetData(RepApplicationTable.C_LAST_MODIFIED_DATE, value); }
        }
		
        [DataMember]
        public string LastModifiedBy
        {
            get { return Convert.ToString(GetData(RepApplicationTable.C_LAST_MODIFIED_BY)); }
            set { SetData(RepApplicationTable.C_LAST_MODIFIED_BY, value); }
        }
		
        [DataMember]
        public DateTime ApprovedDate
        {
            get { return Convert.ToDateTime(GetData(RepApplicationTable.C_APPROVED_DATE)); }
            set { SetData(RepApplicationTable.C_APPROVED_DATE, value); }
        }
		
        [DataMember]
        public string AppovedBy
        {
            get { return Convert.ToString(GetData(RepApplicationTable.C_APPOVED_BY)); }
            set { SetData(RepApplicationTable.C_APPOVED_BY, value); }
        }
		
        [DataMember]
        public string Status
        {
            get { return Convert.ToString(GetData(RepApplicationTable.C_STATUS)); }
            set { SetData(RepApplicationTable.C_STATUS, value); }
        }
		
        [DataMember]
        public string Remark
        {
            get { return Convert.ToString(GetData(RepApplicationTable.C_REMARK)); }
            set { SetData(RepApplicationTable.C_REMARK, value); }
        }
		
		#endregion
	}
	
	
}	

